<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="java.util.*"%>
<%@ page import="com.hrms.pojo.Employee"%>
<%String path = request.getContextPath();%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>所有员工信息</title>
<script type="text/javascript" src="<%=path%>/jquery-3.1.1.min.js"></script>
<script type="text/javascript">
function isDel() {
	return confirm("确定删除吗！")
}
</script>
</head>
<body>
	<center>
		<div style="margin: 50px;">
			<table border="1px" style="border-collapse: collapse;">
				<caption style="font-size: 20px; font: bold;">所有员工信息概要</caption>
				<tr>
					<th>姓名</th>
					<th>性别</th>
					<th>年龄</th>
					<th>身份证号</th>
					<th>操作</th>
				</tr>
				<%
					Object obj = request.getAttribute("empList");
					List<Employee> empList = (List<Employee>) obj;
					for (Employee emp : empList) {
				%>
				<tr>
					<td><%=emp.getEmName()%></td>
					<td><%=emp.getEmSex()%></td>
					<td><%=emp.getEmAge()%></td>
					<td><%=emp.getEmIdNumber()%></td>
					<td><a
						href="<%=path%>/emp/<%=emp.getEmId()%>/getid">详情</a>
						&nbsp; <a href="<%=path%>/emp/alter_emp?emId=<%=emp.getEmId()%>">修改</a>
						&nbsp; <a
						href="<%=path%>/emp/<%=emp.getEmId()%>/remove" onclick="return isDel()">删除</a></td>
				</tr>
				<%
					}
				%>
				<tr>
					<td colspan="5"><h2>
							<a href="<%=path%>/admin/function">返回功能页面</a>
						</h2></td>
				</tr>
			</table>
		</div>
	</center>
</body>
</html>